package io.wongd.lib_douyin.util

import java.util.regex.Pattern

object RegexUtil {
    private val TITLE_PATTERN = Pattern.compile("[\\s\\\\/:*?\"<>|]")

    @JvmStatic
    fun replaceTitle(title: String?): String? {
        title ?: return null
        var r = title
        val matcher = TITLE_PATTERN.matcher(r)
        // 将匹配到的非法字符以空替换
        r = matcher.replaceAll("")
        return r
    }
}